﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="config.aspx.cs" Inherits="UI.system.page.config.config" %>
<%@ Import Namespace="Common" %>
<script src="/system/js/jquery.min.js"></script>
<script src="/system/js/common.js"></script>
<script src="/system/layui/layui.js"></script>
<script src="/system/layui/lay/modules/laydate.js"></script>
<script src="/system/js/md5.js"></script>
<link rel="stylesheet" href="/system/layui/css/layui.css">
<div style="margin: 35px;">
	<form class="layui-form" style="padding-left:0px;">
        <div class="layui-form-item">
			<label class="layui-form-label" >会员费用</label>
			<div class="layui-input-block" style="width:300px;">
                <input id="membermoney" type="text" placeholder="请输入会员费用" autocomplete="off" class="layui-input" value="<%=info.MemberMoney/100 %>">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">返现金额</label>
			<div class="layui-input-block" style="width:300px;">
				<input id="backmoney" placeholder="请输入返现金额" lay-verify="required" autocomplete="off" class="layui-input" value="<%=info.BackMoney/100%>">
			</div>
		</div>
        <div class="layui-form-item">
			<label class="layui-form-label">会员充值手续费</label>
			<div class="layui-input-block" style="width:300px;">
				<input id="shouxufei" placeholder="请输入会员充值手续费" lay-verify="required" autocomplete="off" class="layui-input" value="<%=info.ShouXuFei/100%>" style="width:280px;float:left;"><div style="float:left; padding-top:10px;">&nbsp;%</div>
			</div>
		</div>
        <div class="layui-form-item">
			<label class="layui-form-label">非会员充值手续费</label>
			<div class="layui-input-block" style="width:300px;">
				<input id="shouxufei2" placeholder="请输入非会员充值手续费" lay-verify="required" autocomplete="off" class="layui-input" value="<%=info.ShouXuFei2/100%>" style="width:280px;float:left;"><div style="float:left; padding-top:10px;">&nbsp;%</div>
			</div>
		</div>
        <div class="layui-form-item">
			<label class="layui-form-label">非会员起发红包数量</label>
			<div class="layui-input-block" style="width:300px;">
				<input id="sendcount" placeholder="请输入非会员起发红包数量" lay-verify="required" autocomplete="off" class="layui-input" value="<%=info.SendCount/100%>" style="width:280px;float:left;"><div style="float:left; padding-top:10px;">&nbsp;</div>
			</div>
		</div>
        <div class="layui-form-item">
			<label class="layui-form-label">用户领取红包金额上限</label>
			<div class="layui-input-block" style="width:300px;">
				<input id="maxmoney" placeholder="请输入用户领取红包金额上限" lay-verify="required" autocomplete="off" class="layui-input" value="<%=info.MaxMoney/100%>" style="width:280px;float:left;"><div style="float:left; padding-top:10px;">&nbsp;</div>
			</div>
		</div>
        <div class="layui-form-item">
			<label class="layui-form-label">每分钟领取红包数量</label>
			<div class="layui-input-block" style="width:300px;">
				<input id="maxredcount" placeholder="请输入每分钟领取红包数量" lay-verify="required" autocomplete="off" class="layui-input" value="<%=info.MaxRedCount%>" style="width:280px;float:left;"><div style="float:left; padding-top:10px;">&nbsp;</div>
			</div>
		</div>
        <div class="layui-form-item">
			<label class="layui-form-label"></label>
			<div class="layui-input-inline">
				<a lay-filter="save" class="layui-btn layui-btn-small" onclick="Update_Config()">保存</a>
			</div>
		</div>
	</form>
</div>
<script>
    function Update_Config() {
        var data = {};
        data.act = "Update_Config";
        data.membermoney = $("#membermoney").val();
        data.backmoney = $("#backmoney").val();
        data.shouxufei = $("#shouxufei").val();
        data.shouxufei2 = $("#shouxufei2").val();
        data.sendcount = $("#sendcount").val();
        data.maxmoney = $("#maxmoney").val();
        data.maxredcount = $("#maxredcount").val();
        data.sign = GetSign(data.act);
        Ajax.Post("/tools/Admin.ashx", data, function (r) {
            var json = $.parseJSON(r);
            if (json.state) {
                LayerBox.Success("保存成功");
            }
            else {
                LayerBox.Error(json.msg);
            }
        });
    };
</script>